package cn.kust.clock.pojo.vo;

import cn.kust.clock.pojo.entity.Travels;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author bjs
 * @date 2022/7/27 0027  15:35
 **/
@Data
@NoArgsConstructor
public class TravelsDetailVO {
    private Long id; //游记id

    private Long userId; //用户id

    private List<ClockVO> clockVOList;//打卡的数组

    private String title;//游记标题

    private String cover;//游记封面

    private String description;//游记简介

    private LocalDateTime gmtCreate;//游记创建时间

    private LocalDateTime gmtModified;//游记修改时间

    private Integer likeNum; //点赞数

    private Integer commentNum; //评论数

    public TravelsDetailVO(Travels travels, List<ClockVO> clockVOList, Integer likeNum, Integer commentNum) {
        this.id = travels.getId();
        this.userId = travels.getUserId();
        this.clockVOList = clockVOList;
        this.title = travels.getTitle();
        this.cover = travels.getCover();
        this.description = travels.getDescription();
        this.gmtCreate = travels.getGmtCreate();
        this.gmtModified = travels.getGmtModified();
        this.likeNum = likeNum;
        this.commentNum = commentNum;
    }
}
